package com.eling.elcms.travel.service;

import com.eling.elcms.core.dao.hibernate.search.SearchCondition;
import com.eling.elcms.core.service.IGenericManager;
import com.eling.elcms.travel.model.TravelContract;
import com.eling.elcms.travel.model.WelfareConsumptionCoupon;
import com.eling.elcms.travel.model.WelfareConsumptionCouponDetail;
import com.eling.elcms.travel.model.view.WelfareConsumptionCouponStatisticsView;
import com.eling.elcms.travel.model.view.WelfareConsumptionCouponView;
import com.eling.elcms.travel.model.view.WelfareccView;

import java.util.Date;
import java.util.List;

public interface IWelfareConsumptionCouponManager extends IGenericManager<WelfareConsumptionCoupon, Long> {
	
	/**
	 * 补办
	 * @param cond
	 * @return
	 * @author liyan
	 */
	WelfareConsumptionCoupon postregistered(WelfareConsumptionCoupon cond);
	
	/**
	 * 查询待发放消费券的会员
	 * @param date
	 * @return
	 * @author ly
	 */
	List<WelfareConsumptionCouponView> queryWelfareCard(Date date);
	
	/**
	 *  验证卡号是否已经被使用
	 * @return
	 * @author ly
	 */
	Integer queryWelfareCardAjax(String cardNo);
	
	/**
	 * 根据条件的搜索
	 * @param sc
	 * @return
	 * @author ly
	 */
	List<WelfareConsumptionCouponView> queryWelfareCardSerarch(SearchCondition sc);
	
	/**
	 * 根据条件(会员 卡号 证件号)的搜索
	 * @param sc
	 * @param cond
	 * @param endDate
	 * @return
	 * @author ly
	 */
	List<WelfareConsumptionCoupon> queryWelfareCardSerarchGrid(SearchCondition sc,WelfareConsumptionCoupon cond);
	
	WelfareConsumptionCoupon saveAll(Long pkWelfarecc, Double price,
			String remarkDetail);

	List<WelfareConsumptionCouponDetail> queryAll(WelfareConsumptionCoupon cond, Boolean flag);

	WelfareConsumptionCoupon saveCard(
			WelfareConsumptionCoupon welfareConsumptionCoupon);

	Double queryRule(WelfareConsumptionCoupon cond);

	List<WelfareccView> queryDetail(List<Long> pklist);

	/**
	 * 查询消费卷统计
	 * @param pkWelfarecc
	 * @return
	 */
	List<WelfareConsumptionCouponStatisticsView> queryStatistics(TravelContract cond);

}
